$(document).ready(function() {
	Lock.init();
});
var Lock =  {
        submitHandler: function () {
  		  $.ajax({
			contentType: "application/json;charset=UTF-8",
 			data:$("#loginForm").serializeForm(),
			data: $.toJSON($("#loginForm").serializeForm()),
			url:"admin/user/tolog.json",
			dataType : 'json',
//	    			async: false,    
			type:'POST',
			success : function(data) {
  			 	 window.location=data.url;
			}
		});
        },
        init: function () {
	       	$.backstretch([
						"assets/admin/pages/media/bg/1.jpg",
						"assets/admin/pages/media/bg/2.jpg",
						"assets/admin/pages/media/bg/3.jpg",
						"assets/admin/pages/media/bg/4.jpg"
	       		        ], {
	       		          fade: 1000,
	       		          duration: 8000
		      });
        }

	}


